package com.purchase.ml.entity.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 菜单权限表
 * </p>
 *
 * @author kyyang
 * Created 2021-01-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_permission")
@ApiModel(value = "SysPermission对象", description = "菜单权限表")
public class SysPermission implements Serializable {


    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 父级
     */
    @ApiModelProperty(value = "父级")
    @TableField("parentId")
    private Integer parentId;


    /**
     * 子节点
     */
    @ApiModelProperty(value = "子节点")
    @TableField(exist = false)
    private List<SysPermission> child;
    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    @TableField("name")
    private String name;

    /**
     * 名称
     */
    @ApiModelProperty(value = "英文名称")
    @TableField("enname")
    private String enname;

    /**
     * 样式
     */
    @ApiModelProperty(value = "样式")
    @TableField("component")
    private String component;

    /**
     * 页面地址
     */
    @ApiModelProperty(value = "页面地址")
    @TableField("href")
    private String href;

    /**
     * 类型1一级标题，2二级标题
     */
    @ApiModelProperty(value = "类型1一级标题，2二级标题")
    @TableField("type")
    private Integer type;

    /**
     * 权限
     */
    @ApiModelProperty(value = "权限")
    @TableField("permission")
    private String permission;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @TableField("sort")
    private Integer sort;

    /**
     * 是否使用
     */
    @ApiModelProperty(value = "是否使用")
    @TableField("enabled")
    private Integer enabled;


}
